
#include <assert.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include "reflecxx.h"

void myfunc(char *buffer, int a, float b)
{
}

extern struct reflecxx_full_type myfunc_type_info;

int main(int argc, char *argv[])
{
    struct reflecxx_function *fun;
    int retval = EXIT_SUCCESS;
    
    assert(myfunc_type_info.rft_type == RT_FUNCTION);
    fun = myfunc_type_info.rft_type_info.fun;
    assert(fun->rf_return_type.rft_type == RT_VOID);
    assert(fun->rf_parameter_count == 3);
    assert(strcmp(fun->rf_parameters[0].rp_name, "buffer") == 0);
    assert(fun->rf_parameters[0].rp_full_type.rft_type == RT_STRING);
    assert(strcmp(fun->rf_parameters[1].rp_name, "a") == 0);
    assert(fun->rf_parameters[1].rp_full_type.rft_type == RT_INT);
    assert(strcmp(fun->rf_parameters[2].rp_name, "b") == 0);
    assert(fun->rf_parameters[2].rp_full_type.rft_type == RT_FLOAT);
    
    return retval;
}
